﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace WPFapplication
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            string adminid = t1.Text.Trim();
            string passwrod = t2.Password.Trim();

            if (adminid == "" || passwrod == "")
            {
                MessageBox.Show("账号密码不能为空");
                return;

            }
            if (adminid == "1" || passwrod == "1")
            {
                LoginSuccessful window1 = new LoginSuccessful();
                window1.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("密码或账号输入错误");
            }
        }
    }
}
